import axios from 'axios'

const btn = document.querySelector('#btn')
btn.addEventListener('click', function () {
  axios.get('http://ajax-api.itheima.net/api/books').then(res => console.log(res))
})

//导入css
import './css/index.css'
//导入less
import './less/index.less'

//将大图片添加到body标签中
import imgGif from './asset/images/1.gif'
const img = document.createElement('img')
img.src = imgGif
document.body.appendChild(img)

//字体图标 添加到body标签中
import './asset/fonts/iconfont.css'
const i = document.createElement('i')
i.className = 'iconfont icon-qq'
document.body.append(i)